home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 27 / CU Amiga Magazine's Super CD-ROM 27 (1998)(EMAP Images)(GB)[!][issue 1998-10].iso / CUCD / PowerPC / vbcc / machines / amigawos / libsrc / userlibs / MakeRTG.script < prev   
AmigaDOS Script File  |  1998-08-02  |  2KB  |  96 lines

  1. .key -sd/S
  2.  
  3. if not exists MakeRTG.script
  4.   echo "Please change first to the script's directory!"
  5.   quit
  6. endif
  7.  
  8. if "<-sd>" EQ ""
  9.   set lbmodel large data
  10.   set alibnam rtgm.lib
  11.   set fdflags ""
  12.   set vcflags +warpos -amiga-align
  13. else
  14.   set lbmodel small data
  15.   set alibnam rtgms.lib
  16.   set fdflags -sd
  17.   set vcflags +warpos -amiga-align -sd
  18. endif
  19.  
  20. echo "Checking for required commands. Stopping if missing.*N"
  21.  
  22. failat 5
  23.   echo noline "which    : "
  24.     which which            ;stop if missing. :-)
  25.   echo noline "copy     : "
  26.     which copy
  27.   echo noline "delete   : "
  28.     which delete
  29.   echo noline "execute  : "
  30.     which execute
  31.   echo noline "join     : "
  32.     which join
  33.   echo noline "list     : "
  34.     which list
  35.   echo noline "fd2libWOS: "
  36.     which fd2libWOS
  37.   echo noline "vc       : "
  38.     which vc
  39. failat 20
  40.  
  41. echo "*NCompiling $alibnam with $lbmodel model. This may take some time..."
  42.  
  43. echo "*NCleaning T:..."
  44.   delete t:($alibnam|#?.(s|o|dir)) quiet >nil:
  45.  
  46. echo "*NProcessing FDs..."
  47.  
  48.   list   >t:mkfds lformat="fd2libWOS $fdflags -of *"Creating %%cs...*" -o t: %s%s" fd:rtgmaster_lib.fd
  49.  
  50.   execute t:mkfds
  51.   delete  t:mkfds quiet
  52.  
  53. echo "*NAssembling stubs..."
  54.   vc $vcflags -c t:#?.s
  55.  
  56. echo "*NRemoving obsolete assembler sources..."
  57.   delete t:#?.s t:#?.asm quiet
  58.  
  59. echo "*NCompiling/Assembling support routines..."
  60.   vc $vcflags -c #?.(c|s)
  61.  
  62. echo "*NJoining everything together..."
  63.   join #?.o t:#?.o to t:$alibnam
  64.  
  65. echo "*NCleaning up..."
  66.   delete t:#?.o quiet
  67.  
  68. unset vcflags
  69. unset fdflags
  70. unset lbmodel
  71.  
  72. set instto T:
  73.  
  74. which >nil: ask
  75. if not warn
  76.   ask "*NInstall $alibnam to vlibwos: (y/n)?"
  77.   if warn
  78.     set instto vlibwos:
  79.     failat 21
  80.     copy >nil: t:$alibnam $instto
  81.     if not fail
  82.       delete t:$alibnam quiet
  83.     endif
  84.     failat 20
  85.   endif
  86. endif
  87.  
  88. if exists ${instto}${alibnam}
  89.   echo "*N*N...poooh... $alibnam can be found in ${instto}."
  90. else
  91.   echo "*N*NInstallation error!"
  92. endif
  93.  
  94. unset instto
  95. unset alibnam
  96.